<template>
  <div>
    <model v-model="visible" :title="title" @changeshow="changeshow">
      <template v-if="id == 1" slot="content">
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
      </template>
      <template v-if="id == 2" slot="content">
        <p>你是一只小猪🐖🐽🐾🐷</p>
      </template>
    </model>
  </div>
</template>

<script>
import model from './model.vue'
export default {
  components: {
    model
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: ''
    },
    id: {
      type: Number,
      default: 0
    }
  },
  methods: {
    changeshow() {
      this.$emit('update:visible', false)
    }
  }
  // watch: {
  //   visible(o) {
  //     this.show = o
  //     console.log(o, 999)
  //   }
  // }
}
</script>
